package io.finer.erp.jeecg.stock.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import io.finer.erp.jeecg.stock.entity.ErpSysUser;
import io.finer.erp.jeecg.stock.mapper.ErpUserMapper;
import io.finer.erp.jeecg.stock.service.IErpSysUserService;
@Service
public class ErpSysUserServiceImpl implements IErpSysUserService {
	@Autowired
	private ErpUserMapper userMapper;
	
	@Override
	public String getUserThirdId(String userId) {
		List<ErpSysUser> list = userMapper.getUser(userId);
		if(null != list && 0 != list.size()) {
			ErpSysUser erpSysUser = list.get(0);
			return erpSysUser.getThirdId();
		}
		return StringUtils.EMPTY;
	}


	@Override
	public String getUserNameByPhone(String phone){
		return this.userMapper.getNameByPhone(phone);
	}

}
